package com.xiaoy.core.basic.organization.dao;

import java.util.List;

import org.hibernate.SQLQuery;
import org.springframework.stereotype.Repository;

import com.xiaoy.core.basic.organization.entity.PartyType;
import com.xiaoy.dao.HibernateDaoWrapper;

@Repository
public class OrganizationDao extends HibernateDaoWrapper<PartyType, Long>{
	
	private String tablename="bas_org_Partytype";
	
	public List<PartyType> getAll2 () {
		
		String sql ="select * from "+tablename;
		SQLQuery query = getSession().createSQLQuery(sql);
		
		query.addEntity(PartyType.class);
//		query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
		return query.list();
//		return daoUtil.getAll();
	}
}
